package com.huike.report.domain.vo;


import lombok.Data;

import java.math.BigDecimal;


@Data
public class TargetIndexVo {
    private String create_by;
    private String username;
    private String deptName;
    private Long num;
    private Integer numall;
    private BigDecimal radio;
    private BigDecimal getRadio(Integer all, Long num) {
        if(all.intValue()==0){
            return new BigDecimal(0);
        }
        BigDecimal numBigDecimal = new BigDecimal(num);
        BigDecimal allBigDecimal = new BigDecimal(all);
        BigDecimal divide = numBigDecimal.divide(allBigDecimal,4,BigDecimal.ROUND_HALF_UP);
        return divide.multiply(new BigDecimal(100));
    }
}
